using System;
using System.Collections.Generic;

namespace Abide_AddOn_API.Meta
{
	public class HaloMetaObject
	{
		public string Type;
		public string Offset;
		public string MapOffset;
		public string Name;
		public string Visible;
		public string Size;
		public string Value;
		public string TagTypeOffset;
		public string IdentOffset;
		public string VirtualOffset;
		public string Label;
        public string MaxElements;
        public string PadAlign;
		public string ReflexiveOffset;
		public string ReflexiveSize;
		public string ItemOffset;
		public string ItemType;
		public string Layer;
		public string Class;
		public string Author;
		public string Version;
		public string Description;
        public HaloMetaObject()
        {
            //Setup
            ChildObjects = new List<HaloMetaObject>();
        }
        public HaloMetaObject[] this[string ChildName]
        {
            get
            {
                return ChildObjects.FindAll(c => c.Name == ChildName).ToArray();
            }
        }
		public List<HaloMetaObject> ChildObjects
		{
			get;
			set;
		}
		public override string ToString()
		{
			return string.Concat(new string[]
			{
				this.Type,
				" - ",
				this.Name,
				" - ",
				this.Offset
			});
		}
	}
}
